﻿package mortal.game.view.guildNew.mercenary
{
    import Message.BroadCast.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.game.cache.*;
    import mortal.game.resource.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;

    public class GuildNewMercenaryPerInfo extends GSprite
    {
        protected var _bg:ScaleBitmap;
        protected var _nameDes:GTextFiled;
        protected var _powDes:GTextFiled;
        protected var _detailDes:GTextFiled;
        protected var _nameTxt:GTextFiled;
        protected var _powTxt:GTextFiled;
        protected var _detailTxt:GTextFiled;
        protected var _roleBg:GImageBitmap;
        protected var _roleAvator:GImageBitmap;
        protected var _tbm:GBitmap;

        public function GuildNewMercenaryPerInfo()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._bg = UIFactory.bg(0, 0, 365, 117, this, ImagesConst.PanelBg);
            this._nameDes = UIFactory.gTextField("" + Language.getString(71542), 177, 12, 100, 25, this, GlobalStyle.textFormatPutong.setColor(15721904).setSize(14));
            this._powDes = UIFactory.gTextField("" + Language.getString(71543), 177, 45, 100, 25, this, GlobalStyle.textFormatPutong.setColor(15721904).setSize(14));
            this._detailDes = UIFactory.gTextField("" + Language.getString(71544), 177, 76, 100, 25, this, GlobalStyle.textFormatPutong.setColor(15721904).setSize(14));
            this._nameTxt = UIFactory.gTextField("", 227, 12, 110, 25, this, GlobalStyle.textFormatPutong.setColor(16777215).setSize(14));
            this._powTxt = UIFactory.gTextField("123456789", 226, 46, 100, 25, this, GlobalStyle.textFormatAnjin.setSize(14));
            this._detailTxt = UIFactory.gTextField("", 227, 76, 100, 25, this, GlobalStyle.textFormatlan.setSize(14));
            this._roleBg = UIFactory.gImageBitmap(ImagesConst.ChatRoleHeadBg, 55, 26, this);
            this._roleAvator = UIFactory.gImageBitmap("AvatarBig_1_1.png", 56, 9, this);
            this._tbm = UIFactory.gBitmap(ImagesConst.guildNewMercenaryMyInfoT, 6, 0, this);
            this.upateSelfInfo();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._bg = null;
            this._nameDes = null;
            this._powDes = null;
            this._detailDes = null;
            this._nameTxt = null;
            this._powTxt = null;
            this._detailTxt = null;
            this._roleBg = null;
            this._roleAvator = null;
            this._tbm = null;
            super.disposeImpl(param1);
            return;
        }// end function

        public function upateSelfInfo() : void
        {
            var _loc_1:* = Cache.instance.role.entityInfo;
            this._nameTxt.text = _loc_1.name;
            this._powTxt.text = "" + _loc_1.combat;
            this._detailTxt.text = "" + _loc_1.level + Language.getString(71545) + GameDefConfig.instance.getItem("ECareer", _loc_1.career).text;
            this._roleAvator.imgUrl = AvatarUtil.getPlayerAvatarUrl(_loc_1.career, _loc_1.sex, AvatarUtil.Big);
            return;
        }// end function

    }
}
